{% include 'partials/header.twig' %}
{% include 'partials/nav.twig' %}

<div class="container">
    <form id="reset-password" class="form-reset-password" role="form" method="post" name="reset_form" action="/auth/reset">
        {% include 'partials/csrf_token.twig' %}
        <h2 class="form-signin-heading">Reset Password</h2>

        {% if error %}
            <div class="alert alert-danger">
                <strong>{{ error }}</strong>
            </div>
        {% endif %}

        <p>Please enter the email address for your account. A verification code will be sent to you. Once you have received the verification code, you will be able to choose a new password for your account.</p>

        {% if success %}
            <div class="alert alert-success" role="alert">Please check your emails</div>
        {% else %}
        <div class="form-group">
            <input type="email" class="form-control input-lg" placeholder="Email" required="required" name="email" value="{{ email }}" ng-model="email">
        </div>

        <button type="submit" class="btn btn-lg btn-primary btn-block" ng-disabled="reset_form.$invalid">Submit</button>
        {% endif %}
    </form>
</div>

{% include 'partials/footer.twig' %}